1 package com.iluwatar;
2
3 public class Hobbits implements WeatherObserver {
4
5 @Override
6 public void update(WeatherType currentWeather) {
7 switch (currentWeather) {
8 case COLD:
9 System.out.println("The hobbits are shivering in the cold weather.");
10 break;
11 case RAINY:
12 System.out.println("The hobbits look for cover from the rain.");
13 break;
14 case SUNNY:
15 System.out.println("The happy hobbits bade in the warm sun.");
16 break;
17 case WINDY:
18 System.out.println("The hobbits hold their hats tightly in the windy weather.");
19 break;
20 default:
21 break;
22 }
23 }
24
25 }